Description: 这里给大家提供一个用C语言做的小系统__停车场管理系统和有关Josephus问题的解决,是关于数据结构.-here to provide you with a C language system __ small carpark management system and the Josephus resolve the problem of data structure. Platform: |
Size: 3438 |
Author: 阁元成 |
Hits:
Description: Josephus 排列问题定义如下:假设n 个竞赛者排成一个环形。给定一个正整数m,从某
个指定的第1 个人开始,沿环计数,每遇到第m 个人就让其出列,且计数继续进行下去。这
个过程一直进行到所有的人都出列为止。最后出列者为优胜者。每个人出列的次序定义了整
数1,2,…,n 的一个排列。这个排列称为一个(n,m)Josephus 排列。
例如,(7,3)Josephus 排列为3,6,2,7,5,1,4。-Josephus problem with the definition is as follows : Suppose n race who formed a ring. Given a positive integer m, from a certain section of a designated individual, along the Central Counting that every individual section m let out its out and count continue. This process continues until all the people from far out. Finally out of the winners were shown. Everyone out in the order shown in the definition of integers 1, 2, ..., n an order. With this as a (n, m), with Josephus. For example, (7,3) Josephus, were 3,6,2,7,5,1,4. Platform: |
Size: 1095 |
Author:李飞飞 |
Hits:
Description: 约瑟夫环问题。从这个程序可以学习到结构体的应用及指针的应用,当然还有算法了-Josephus problem. This procedure can learn the structure of the application and the target application and, of course, the algorithm Platform: |
Size: 1431 |
Author:hxj1984 |
Hits:
Description: 约瑟夫环问题 采用C语言编写 没有用链表 而是用数组实现-Josephus problem using C language does not use chain instead of the array to achieve Platform: |
Size: 1032 |
Author:李 |
Hits:
Description: Josephus排列问题定义如下:假设n个竞赛者排成一个环形。给定一个正整数m,从某个指定的第一个人开始,沿环计数,每遇到第m个人就让其出列,且计数继续进行下去。这个过程一直到所有的人都出列为止。最后出列都优胜者。每个人出列的次序定义了整数1,2,...,n的一个排列。这个排列称为一个(n,m)Josephus排列。例如,(7,3)Josephus排列为3,6,2,7,5,1,4.对于给定的1,2,...n中的k个数,Josephus想知道是否存在一个正整数m(n,m)Josephus排列的最后k个数为事先指定的这k个数。-Josephus problem with the definition is as follows : Suppose n player formed a ring. Given a positive integer m, from a designated first started along the Central Counting that every individual section m let out their series and counting continued. This process has been to all of them from far out. Finally out from all the winners. Everyone out in the order shown in the definition of integers 1, 2 ,..., n an order. This arrangement known as a (n, m) Josephus arranged. For example, (7,3) Josephus order of 3, 6,2,7,5,1,4. For a given set of 1,2, ... n and k the number, Josephus would like to know whether there is a positive integer m (n, m) Josephus with the final number k prior to the designated number k this. Platform: |
Size: 2011 |
Author:诛仙 |
Hits:
Description: 用循环链表求解约瑟夫(josephus)问题
求解约瑟夫(josephus)问题,用数组实现-cyclic Chain Solution Joseph (josephus) problem solving Joseph (josephus ), using the array to achieve Platform: |
Size: 9010 |
Author:zy |
Hits:
Description: 问题描述:n个人围成一个环,从第i个开始,由1到interval不断报数,凡报到interval的出列,直到环空为。出列的人按先后顺序构成一个新的序列。例如,n=8,i=2,interval=3.则输出序列为:4 7 2 6 3 1 5 8-Problem description: n individuals into a ring, from the beginning, I by 1 to interval number off, report any interval matri, till the annulus. Break the ranks of people according to the order in which they constitute a new sequence. For example, n = 8, I = 2, interval = 3. The output sequence is: 4 7 2 6 3 1 5 8 Platform: |
Size: 17408 |
Author:zhongdecai |
Hits:
Description: 约瑟夫环(约瑟夫问题)是一个数学的应用问题:已知n个人(以编号1,2,3...n分别表示)围坐在一张圆桌周围。从编号为k的人开始报数,数到m的那个人出列;他的下一个人又从1开始报数,数到m的那个人又出列;依此规律重复下去,直到圆桌周围的人全部出列-Josephus (Josephus problem) is the application of a mathematical problem: Given n individuals (with numbers 1,2,3 ... n respectively) sitting around a round table. From the number of people gettin k, number of the m man out of the line he' s the next person and a number of gettin number to m the man was out of the line and so the law is repeated until the round table were all out of the line Platform: |
Size: 520192 |
Author:rivasherlock |
Hits:
Description: (2)利用循环链表实现约瑟夫问题的求解。 约瑟夫问题如下:已知n个人(n≥1)围坐一圆桌周围,从1开始顺序编号。从序号为1的人开始报数,顺时针数到m的那个人出列。他的下一个人又从1开始报数,数到m的那个人又出列。依次规则重复下去,直到所有人全部出列。请问最后一个出列的人的编号-(2) the use of circular linked list to achieve problem solving Joseph. Joseph problem as follows: Given n individual (n≥1) sitting around a round table, in order a start number. From the number of people began to count off 1, clockwise number to m the man out of the column. His next person and 1 Countin, count to m the man was out of the column. Turn rule is repeated until everyone all the columns. Will the last one out of the column number of people Platform: |
Size: 12288 |
Author:gary |
Hits:
Description: 描述
约瑟夫问题:有n只猴子,按顺时针方向围成一圈选大王(编号从1到n),从第1号开始报数,一直数到m,数到m的猴子退出圈外,剩下的猴子再接着从1开始报数。就这样,直到圈内只剩下一只猴子时,这个猴子就是猴王,编程求输入n,m后,输出最后猴王的编号。
输入
每行是用空格分开的两个整数,第一个是 n, 第二个是 m ( 0 < m,n <=300)。最后一行是:
0 0
输出
对于每行输入数据(最后一行除外),输出数据也是一行,即最后猴王的编号-Joseph describes the problem: There n monkeys, clockwise circle selected King (numbered 1 to n), No. 1 the beginning of the number of packets, the number has to m, m number of monkeys to exit out of the loop, left under the monkey and then followed start number 1 newspaper. In this way, the circle until only a monkey, the monkey is the monkey, programming seek input n, after m, the number of output last Monkey King. Enter each line are two integers separated by a space, the first is n, the second is m (0 < m, n < = 300). The last line is: 00 Output For each line of input data (except for the last line), the output data is a line that the final number of the Monkey King Platform: |
Size: 1024 |
Author:Yilia |
Hits:
Description: Josephus问题,n个人围坐在一圆桌,从编号k的人开始报数,数到m的人出列,下一个人从1开始报-Josephus problem, n individuals sitting around a round table, the number of people began to count off k, the number of people out of the m column, the next person 1 Gettin Platform: |
Size: 1024 |
Author:niuyi |
Hits:
Description: 编程求Josephus问题:m个小孩围成一圈,从第一个小孩开始顺时针方向每数到第n个小孩时这个小孩就离开,最后剩下的一个小孩是胜利者。求第几个小孩是胜利者。(Programming for Josephus problem: m children are surrounded by a circle. From the first child starts clockwise, every child counts to n child. The last child is the winner. A number of children is the winner) Platform: |
Size: 6144 |
Author:呵呵哒啦啦啦
|
Hits: